/**
 * 知识库API
 *
 * @Date 2021/3/15 12:56
 * @author 周世焕
 */

import axios from "@/libs/api.request";

/**
 * 根据tenant获取列表，无需参数
 */
export function getByTenantId(params) {
    return  axios.request({
        url: '/v1/service/knowledge/tenant',
        params:params,
        method: 'get'
    })
}

/**
 * 新增
 */
export function save(data) {
    return  axios.request({
        url: '/v1/service/knowledge',
        data:data,
        method: 'post'
    })
}

/**
 * 根据id删除
 */
export function deleteById(id) {
    return  axios.request({
        url: '/v1/service/knowledge',
        params: {id:id},
        method: 'delete'
    })
}


/**
 * 根据id查询
 */
export function findById(id) {
    return  axios.request({
        url: '/v1/service/knowledge',
        params: {id:id},
        method: 'get'
    })
}
